luci-base: add `responseProgress` callback and `stderr` option
authorRichard Yu <[email protected]>
Mon, 1 Sep 2025 14:39:47 +0000 (22:39 +0800)
committerPaul Donald <[email protected]>
Fri, 12 Dec 2025 15:39:55 +0000 (16:39 +0100)
commitece28ab5a4d476c73d404fbbb6d3b919832fea13
treec15367feefbf477b8c42ab6ec5f90e20094149d2
parentfdef3c0d0cb3330a08666f98a77455c45dfc2630
luci-base: add `responseProgress` callback and `stderr` option
for LuCI.request and `fs.exec_direct()`.

This commit adds XHR response progress event option in luci.js and fs.js.
And diagnostics.js will use this new event to update command output.

This commit also adds a `stderr` option in `fs.exec_direct()`, and
requires a patch for `cgi-io`.

Currently `cgi-io` redirects stderr to /dev/null, which makes user
unable to see error messages. The patch adds a `stderr` option,
and if it's set to `1`, redirects stderr to stdout.

Signed-off-by: Richard Yu <[email protected]>
Link: https://github.com/openwrt/luci/pull/7920
modules/luci-base/htdocs/luci-static/resources/fs.js
modules/luci-base/htdocs/luci-static/resources/luci.js